<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div><a href="${ctx}/user/toAdd">增加用户</a></div>
<table>
    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>密码</th>
        <th>性别</th>
    </tr>
  <c:forEach items="${list}" var="user">
      <tr>
          <td>${user.id}</td>
          <td>${user.name}</td>
          <td>${user.password}</td>
          <td>${user.sex}</td>
      </tr>

  </c:forEach>
</table>
</body>
</html>
